package com.jxw.studyrecord;

import android.text.TextUtils;
import android.util.Log;

/* loaded from: classes.dex */
public class StudyRecordPrimaryName extends StudyRecordBaseName {
    private static final String CH_BASE_WORD = "语文-基础词语";
    private static final String CH_CHARACTER = "语文-汉字学习";
    private static final String CH_CLASSIC_POETRY = "语文-古诗词";
    private static final String CH_PIAN_PANG = "语文-偏旁部首";
    private static final String CH_PIN_YIN = "语文-拼音学习";
    private static final String CH_READ = "语文-阅读指导";
    private static final String CH_STROKE_NAME = "语文-笔画名称";
    private static final String CH_STROKE_RULE = "语文-笔顺规则";
    private static final String CH_VALUABLE = "语文-中华宝典";
    private static final String CH_WRITING = "语文-语文写作";
    private static final String EN_GRAMMAR = "英语-英语语法";
    private static final String EN_LETTER = "英语-英文字母";
    private static final String EN_READ = "英语-英语阅读";
    private static final String EN_SPOKEN = "英语-口语交际";
    private static final String EN_VOCABULARY = "英语-英语词汇";
    private static final String EN_WRITING = "英语-英语写作";
    private static final String MATH_AO_SHU = "数学-奥数训练";
    private static final String MATH_EQUATION = "数学-式与方程";
    private static final String MATH_FORMULA = "数学-数学公式";
    private static final String MATH_FOUR_ARITHMETIC = "数学-四则运算";
    private static final String MATH_KOU_JUE = "数学-算术口诀";
    private static final String MATH_NUMBER = "数学-认识数字";
    private static final String MATH_NUM_ARITHMETIC = "数学-数的运算";
    private static final String MATH_YING_YONG_TI = "数学-应用题训练";
    private static final String MORE_USER_GUIDE = "更多-使用指南";
    private static final String PRIMARY_CH = "小学同步-语文";
    private static final String PRIMARY_EN = "小学同步-英语";
    private static final String PRIMARY_MATH = "小学同步-数学";
    private static final String TAG = "StudyRecordPrimaryName";

    public static String getName(String str, String str2, String str3) {
        if (TextUtils.isEmpty(str) || TextUtils.isEmpty(str2)) {
            Log.i(TAG, "getName(): packageName or className is empty");
            return null;
        }
        String onLineStudyName = getOnLineStudyName(str, str2, str3);
        if (TextUtils.isEmpty(onLineStudyName)) {
            String fileListName = getFileListName(str, str2, str3);
            if (TextUtils.isEmpty(fileListName)) {
                String dictName = getDictName(str, str2, str3);
                if (TextUtils.isEmpty(dictName)) {
                    String otherComName = getOtherComName(str, str2);
                    return !TextUtils.isEmpty(otherComName) ? otherComName : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_LETTER, str2, StudyRecordAPKInfo.CLASS_LETTER) ? EN_LETTER : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_PIN_YIN, str2, StudyRecordAPKInfo.CLASS_PIN_YIN) ? CH_PIN_YIN : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_STROKE_NAME, str2, "com.example.viewpageindicator.MainActivity") ? CH_STROKE_NAME : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_PIAN_PANG, str2, "com.example.viewpageindicator.MainActivity") ? CH_PIAN_PANG : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_STROKE_RULE, str2, "com.example.viewpageindicator.MainActivity") ? CH_STROKE_RULE : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_CHARACTER, str2, StudyRecordAPKInfo.CLASS_CHARACTER) ? CH_CHARACTER : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_NUMBER, str2, StudyRecordAPKInfo.CLASS_NUMBER) ? MATH_NUMBER : isSamePackageClassName(str, StudyRecordAPKInfo.PACKAGE_KOU_JUE, str2, StudyRecordAPKInfo.CLASS_KOU_JUE) ? MATH_KOU_JUE : otherComName;
                }
                return dictName;
            }
            return fileListName;
        }
        return onLineStudyName;
    }

    private static String getOnLineStudyName(String str, String str2, String str3) {
        String str4;
        if (TextUtils.isEmpty(str3) || !str.equals(StudyRecordAPKInfo.PACKAGE_NAME_ON_LINE_STUDY)) {
            return null;
        }
        if (str2.equals(StudyRecordAPKInfo.CLASS_NAME_ON_LINE_STUDY)) {
            String fileName = getFileName(str3, true);
            if (TextUtils.isEmpty(fileName)) {
                return null;
            }
            if (fileName.equals("口语交际")) {
                str4 = EN_SPOKEN;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_EN_VOCABULARY)) {
                str4 = EN_VOCABULARY;
            } else if (fileName.equals("英语阅读")) {
                str4 = EN_READ;
            } else if (fileName.equals("英语语法")) {
                str4 = EN_GRAMMAR;
            } else if (fileName.equals("英语写作")) {
                str4 = EN_WRITING;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_CH_VALUABLE)) {
                str4 = CH_VALUABLE;
            } else if (fileName.equals("基础词语")) {
                str4 = CH_BASE_WORD;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_CH_CLASSIC_POETRY)) {
                str4 = CH_CLASSIC_POETRY;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_CH_READ)) {
                str4 = CH_READ;
            } else if (fileName.equals("语文写作")) {
                str4 = CH_WRITING;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_MATH_NUM_ARITHMETIC)) {
                str4 = MATH_NUM_ARITHMETIC;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_MATH_EQUATION)) {
                str4 = MATH_EQUATION;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_MATH_YING_YONG_TI)) {
                str4 = MATH_YING_YONG_TI;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_MATH_AO_SHU)) {
                str4 = MATH_AO_SHU;
            } else if (fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_PRI_MATH_FORMULA)) {
                str4 = MATH_FORMULA;
            } else if (!fileName.equals(StudyRecordAPKInfo.ARG_SUB_ON_LINE_STUDY_MORE_USER_GUIDE)) {
                return null;
            } else {
                str4 = MORE_USER_GUIDE;
            }
            return str4;
        } else if (str2.equals(StudyRecordAPKInfo.CLASS_NAME_ON_LINE_STUDY_LIST)) {
            if (str3.equals(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PRI_CH)) {
                return PRIMARY_CH;
            }
            if (str3.equals(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PRI_MATH)) {
                return PRIMARY_MATH;
            }
            if (str3.equals(StudyRecordAPKInfo.ARG_ON_LINE_STUDY_LIST_PRI_EN)) {
                return PRIMARY_EN;
            }
            return null;
        } else {
            return null;
        }
    }
}
